<template>
  <a-dialog-keep :visible="open" title="呼叫设置" width="400px">
    <el-form
      label-position="left"
      class="demo-table-expand"
      label-width="140px"
      size="mini"
    >
      <el-row>
        <el-col :span="24">
          <el-form-item label="无响应重复呼叫" prop="cate">
            <el-switch
              v-model="formData.recall"
              active-color="#13ce66"
              inactive-color="#ff4949"
            >
            </el-switch>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="重复呼叫次数" prop="cate">
            <el-input
              v-model="formData.recount"
              placeholder="请输入次数"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="重复等待时间" prop="cate">
            <el-input v-model="formData.waitTIme" placeholder="请输入时间">
              <template slot="append">秒</template>
            </el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="cancel" size="mini">关闭</el-button>
      <el-button type="primary" @click="saveConfig" size="mini"
        >保存设置</el-button
      >
    </div>
  </a-dialog-keep>
</template>

<script>
import dialogMixin from "@/mixins/dialogMixin";
export default {
  name: "CallSetDialog",
  mixins: [dialogMixin],
  components: {},
  data() {
    return {
      formData: {
        recall: false,
        recount: 1,
        waitTIme: 10,
      },
      userNames: "",
    };
  },
  methods: {
    show() {
      this.open = true;
    },
    cancel() {
      this.open = false;
    },
    saveConfig() {
      this.open = false;
      this.$modal.msgSuccess("设置保存成功");
    },
  },
};
</script>

<style lang="scss" scoped></style>
